<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css"></link>
    <script type="javascript" src="../js/bootstrap.js"></script>
    <script type="javascript" src="${pageContext.request.contextPath}/js/jquery3_6.js"></script>
</head>
<body>
<div class="container">
    <h4>添加图书</h4>
    <form method="post" action="addBook" enctype="multipart/form-data">
        <div class="form-group row">
            <label for="name" class="col-sm-2 col-form-label">图书名：</label>
            <div class="col-sm-7">
                <input type="text" id="name" name="name"
                       value=""
                       class="form-control" placeholder="请输入图书名">
            </div>
        </div>
        <div class="form-group row">
            <label for="cover" class="col-sm-2 col-form-label">图书封面：</label>
            <div class="col-sm-7">
                <div class="custom-file">
                    <input type="file" id="cover" name="cover"
                           class="custom-file-input" >
                    <label class="custom-file-label" for="cover">选择文件</label>
                </div>
            </div>
        </div>
        <div class="form-group row">
            <div class="col-sm-6 text-right">
                <button type="submit" class="btn btn-primary">添加</button>
            </div>
            <div class="col-sm-6">
                <button type="reset" class="btn btn-danger">重设</button>
            </div>
        </div>
    </form>
</div>
<!--<div class="container">-->
<!--    <h4>添加图书</h4>-->
<!--</div>-->
<!--<form action="${pageContext.request.contextPath}/testfile" method="post" enctype="multipart/form-data">-->
<!--    <div class="form-group row">-->
<!--        <label for="name" class="col-sm-2 col-form-label">图书名: </label>-->
<!--        <div class="col-sm-7">-->
<!--            <input type="text" id="name" name="name" value="${book.name}" placeholder="请输入图书名">-->
<!--        </div>-->
<!--        <div class="col-sm-3 text-danger">-->
<!--            <form:errors path="book.name"/>-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group row">-->
<!--        <label for="cover" class="col-sm-2 col-form-label">图书封面</label>-->
<!--        <div class="col-sm-7">-->
<!--            <div class="custom-file">-->
<!--                <input type="file" id="cover" name="cover" class="custom-file-input">-->
<!--                <label class="custom-file-label" for="cover">选择文件</label>-->
<!--            </div>-->
<!--            <div class="col-sm-3 text-danger">-->
<!--                <form:errors path="book.cover"></form:errors>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="form-group row">-->
<!--            <div class="col-sm-6 text-light">-->
<!--                <button type="submit" class="btn btn-primary">添加</button>-->
<!--            </div>-->
<!--            <div class="col-sm-6">-->
<!--                <button type="reset" class="btn btn-danger">重设</button>-->
<!--            </div>-->
<!--        </div>-->

<!--    </div>-->
<!--</form>-->
</body>
</html>